# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: archtux <antonio.arias99999 at gmail.com>

pkgname=converseen
pkgver=0.9.11.1
pkgrel=1
pkgdesc='Batch image converter and resizer'
arch=('loong64' 'x86_64')
url='http://converseen.fasterland.net/'
license=('GPL3')
depends=('hicolor-icon-theme' 'imagemagick' 'qt5-base')
makedepends=('cmake' 'qt5-tools') 
source=("https://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2")
sha256sums=('85511aed2644a7e87f5bcbe60cbc3edcbdcfbb2c4bb9416df939ba84ad31a503')

prepare() {
  cd $pkgname-$pkgver
  convert res/converseen.png +set date:create +set date:modify -resize 256x256 -alpha on res/converseen.png
  sed -i 's|/share/pixmaps|/share/icons/hicolor/256x256/apps|' CMakeLists.txt
}

build() {
  cmake -B build -S $pkgname-$pkgver \
    -DCMAKE_INSTALL_PREFIX=/usr
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}
